package com.yfbao.horizon.schedule.tk;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.EnableScheduling;

@Slf4j
@EnableScheduling
@EnableAspectJAutoProxy
@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }


    @EventListener(ApplicationReadyEvent.class)
    public void check() {
        log.info("test-------------");
        String tt ="{\"host\": \"localhost\", \"port\": \"3306\", \"username\": \"root\", \"password\": \"password123\", \"database\": \"test_db\", \"type\": \"mysql\"}";
    }

//    @EventListener(ApplicationReadyEvent.class)
//    public void checkJvmMetrics(MeterRegistry registry) {
//        registry.getMeters().forEach(meter -> {
//            log.info("meter-name:"+meter.getId().getName());
//        });
//    }
}
